//
//  SCCarMaintenReportCell.m
//  Shuaiche
//
//  Created by liyanan on 2019/8/7.
//  Copyright © 2019 zzs. All rights reserved.
//

#import "SCCarMaintenReportCell.h"
#import "NSString+Helper.h"
#import "UIImageView+WebCache.h"

@interface SCCarMaintenReportCell()
@property (weak, nonatomic) IBOutlet UIImageView *carlogo;
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *dateLab;
@property (weak, nonatomic) IBOutlet UIButton *checkBtn;

@end


@implementation SCCarMaintenReportCell

-(void)setModel:(SCMaintenanceModel *)model {
    
    _model = model;
    [_carlogo sd_setImageWithURL:[NSURL URLWithString:sc_url_img(model.merchantLogoPic)] placeholderImage:[UIImage imageNamed:@"com_74"]];
    
    NSString *merchanName = [NSString SC_isBlankString:model.merchantName] ? @"--" : [model.merchantName merchantAbbreviation];
    NSString *recordStr = [NSString stringWithFormat:@"%@分享了维保记录", merchanName];
    _titleLab.text = recordStr;
    _dateLab.text = [NSString formateDate:model.createTime];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.checkBtn.layer.cornerRadius = 4;
    self.checkBtn.layer.masksToBounds = YES;
    self.checkBtn.layer.borderColor = SC_HEX(0xF99802).CGColor;
    self.checkBtn.layer.borderWidth = 1;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
